//
//  OneDayTwoTableViewCell.m
//  news
//
//  Created by imacbookair on 16/3/10.
//  Copyright © 2016年 imacbookair. All rights reserved.
//

#import "OneDayTwoTableViewCell.h"

@implementation OneDayTwoTableViewCell

#pragma mark - 初始化

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 背景图片
        self.bottom = [[UIImageView alloc]init];
        _bottom.image = [UIImage imageNamed:@"bai"];
        _bottom.layer.borderWidth = 0.2;
        _bottom.layer.borderColor = [UIColor grayColor].CGColor;
        _bottom.layer.cornerRadius = 3;
        _bottom.clipsToBounds = YES;
        
        // 标题
        self.title = [[UILabel alloc]init];
        
        // 左图
        self.leftPicture = [[UIImageView alloc]init];
        
        // 中间图
        self.amongPicture = [[UIImageView alloc]init];
        
        
        // 右侧图片
        self.rightPicture = [[UIImageView alloc]init];
        
        // 数
        
        self.count = [[UILabel alloc]init];
        self.count.textAlignment = NSTextAlignmentRight;
        
        [self.contentView addSubview:self.bottom];
        [self.bottom addSubview:self.title];
        [self.bottom addSubview:self.leftPicture];
        [self.bottom addSubview:self.amongPicture];
        [self.bottom addSubview:self.rightPicture];
        [self.bottom addSubview:self.count];
        
        [_bottom NightWithType:UIViewColorTypeNormal];
        [_title NightWithType:UIViewColorTypeNormal];
        [_leftPicture NightWithType:UIViewColorTypeNormal];
        [_amongPicture NightWithType:UIViewColorTypeNormal];
        [_rightPicture NightWithType:UIViewColorTypeNormal];
        [_count NightWithType:UIViewColorTypeNormal];

    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.bottom.frame = CGRectMake(10, 5, 360, 150);
    self.title.frame = CGRectMake(7, 5, 250, 30);
    self.count.frame = CGRectMake(260, 5, 90, 30);
    self.leftPicture.frame = CGRectMake(7, 40, 110, 100);
    self.amongPicture.frame = CGRectMake(123, 40, 110, 100);
    self.rightPicture.frame = CGRectMake(240, 40, 110, 100);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
